import { createStore } from 'redux'

let reducer = (state, action) => {
    let NewState = JSON.parse(JSON.stringify(state))
    switch(action.type) {
        case "SET_ROUTER_LIST":
            NewState.routerList = action.arr
            return NewState
        default:
            return state
    }
}

let initState = {
    routerList: []
}

let store = createStore(reducer, initState)

export default store